package com.niiwoo.civet.account.dao.mapper;

import com.niiwoo.civet.account.dao.entity.MoneyTotal;
import com.niiwoo.civet.account.enums.AccountAmountTypeEnum;
import org.apache.ibatis.annotations.Param;

import java.math.BigDecimal;
import java.util.List;

public interface MoneyTotalMapperExt extends MoneyTotalMapper{

    MoneyTotal queryMoneyTotalByAccountIdAndAmountType(@Param("accountId")Long accountId, @Param("amountType")Integer amountType);

    MoneyTotal selectByPrimaryKeyForUpdate(@Param("id")Long id);

    List<MoneyTotal> queryMoneyTotalByUserId(@Param("userId")String userId,@Param("accountId")Long accountId);

    BigDecimal queryMoneyTotalByUserIdAndType(@Param("userId")String userId, @Param("list")List<Integer> amountTypeList);

    BigDecimal queryMoneyTotalByAmountTypeList(@Param("amountTypeList") List<AccountAmountTypeEnum> amountTypeList);

    BigDecimal queryMoneyByUserIdAndAccountType(@Param("userId")String userId,@Param("amountType") Integer amountType);
}